<template>
  <el-dialog
    v-fullScreen
    title="查询设备列表"
    :visible.sync="showSearch"
    v-if="showSearch"
    width="70%"
    :close-on-click-modal="false"
    :append-to-body='true'
  >
    <div class="el-dialog-div">
      <dev-list
        @confirm="confirm"
        :from="from"
      ></dev-list>
    </div>
  </el-dialog>
</template>

<script>
import DevList from './DevList';
export default {
  components: { DevList },
  data() {
    return {
      showSearch: false,
      from: '',
    };
  },
  methods: {
    show(from) {
      this.showSearch = true;
      this.from = from;
    },
    confirm(obj) {
      this.showSearch = false;
      this.$emit('confirm', obj);
    },
  },
};
</script>

<style scoped>
.el-dialog-div {
  height: 60vh;
}
</style>